﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PowerTestController.Models
{
    public partial class SerialPortModel : ObservableObject
    {
        [ObservableProperty]
        private string portName;

        [ObservableProperty]
        private int baudRate = 230400;

        [ObservableProperty]
        private Parity parity=Parity.None;

        [ObservableProperty]
        private int dataBits = 8;

        [ObservableProperty]
        private StopBits stopBits=StopBits.One;

        [ObservableProperty]
        private ObservableCollection<StopBits> stopBitsItems = new ObservableCollection<StopBits>()
        {
            //StopBits.None,
            StopBits.One,
            StopBits.Two,
            //StopBits.OnePointFive
        };
        [ObservableProperty]
        private ObservableCollection<Parity> parityItems = new ObservableCollection<Parity>()
        {
            Parity.None,
            Parity.Odd,
            Parity.Even,
            //Parity.Mark,
            //Parity.Space
        };
    }
}
